#pragma once
#include <string>
#include <odb/core.hxx>

namespace im{
    #pragma db object table("friend_apply")
    class FriendApply{
    public:
        FriendApply(){}
        FriendApply(const std::string& uid, const std::string& pid)
            :_applicant_id(uid),_respondent_id(pid){}

        void applicant_id(const std::string& uid){ _applicant_id = uid; }
        std::string applicant_id() const { return _applicant_id; }

        void respondent_id(const std::string& rid){ _respondent_id = rid; }
        std::string respondent_id() const { return _respondent_id; }

    private:
        friend class odb::access;
        #pragma db id auto
        unsigned int _id;
        #pragma db type("VARCHAR(64)") index
        std::string _applicant_id;
        #pragma db type("VARCHAR(64)") index
        std::string _respondent_id;
    };
}